<template>
  <el-container class="common-layout">
    <el-header>
      <Header />
    </el-header>
    <el-container>
      <el-aside>
        <Aside />
      </el-aside>
      <el-main>
        <Crumbs />
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script setup lang="ts">
import Header from '@/components/header/index.vue'
import Aside from '@/components/aside/index.vue'
import Crumbs from '@/components/crumbs/crumbs.vue'
import { provide, ref } from 'vue'

const isCollapse = ref(false)
provide('isCollapse', isCollapse)
</script>

<style lang="less" scoped>
.common-layout {
  height: 100%;
  :deep(.el-header) {
    height: 70px;
    background-color: #409eff;
  }
  :deep(.el-aside),
  :deep(.el-main) {
    height: calc(100vh - 70px);
    width: auto;
    padding-top: 0;

    &::-webkit-scrollbar {
      width: 0;
    }
  }

  :deep(.el-breadcrumb) {
    position: fixed;
    width: 100%;
    z-index: 999;
    background-color: #fff;
    padding: 15px 20px 20px 40px;
    border-bottom: 1px solid #eee;
    margin-left: -20px;
  }
}
</style>
